<h2>Primary Applicant</h2>

<div id="intake-side">

    <ul id="contact-name">
    <li><a href='%%[base_url]%%/contacts.php/%%[contact_id]%%/?intake_id=%%[intake_id]%%'><span>%%[client_name]%%</span></a></li>
    </ul>

    <dl>

        <dt><label>Phone</label></dt>
        <dd>%%[client_phone]%%</dd>
        
    </dl>
    
    <!-- intake workflow -->
        
    <h3 id="actions">Intake Workflow</h3>

        <ul>
        <li><a href="%%[base_url]%%/intakes.php/%%[intake_id]%%/step1/">Step 1a: Citizenship</a></li>
        <li><a href="%%[base_url]%%/intakes.php/%%[intake_id]%%/step1b/">Step 1b: Eligible Immigrant</a></li>
        <li><a href="%%[base_url]%%/intakes.php/%%[intake_id]%%/step2/">Step 2: Income|Assets</a></li>
        </ul>

</div> <!-- /#intake-side -->    
	
<div id="main-content">

    <!-- Immigrant status -->
        
    <h3>Step 1b: Eligible Immigrant Status</h3>
		
    <form action="%%[base_url]%%/ops/update_intake.php" method="post" name="ws">

        <!-- status -->
            
        <h4 id="status" class="select-one">Select One: Status* | <a href="#document">Document Type</a></h4>

        <ul>
        %%[noncitizentype,noncitizentype,radio]%%
        </ul>
               
        <!-- document type -->

        <h4 id="document">Select One: Document Type* | <a href="#status">Status</a></h3>

        <div id="doc-number">

            <ul>
            %%[noncitizendoc radio]%%</li>
            </ul>
            
            <div>
            <strong>Doc No.</strong> <input type="text" name="noncitizendocnum" value="%%[noncitizendocnum]%%" title="Enter the applicant's specific immigrant-status document number, if any." />
            </div>

        </div> <!-- /#doc-number -->            
            
        <!-- intake notes -->
        
        <dl id="intake-notes">                
            
            <dt><label>Intake Notes</label></dt>
            <dd><textarea name="intake_notes" cols="" rows="6" tabindex="1" />%%[intake_notes]%%</textarea></dd>

        </dl>

        <input type="hidden" name="intake_id" value="%%[intake_id]%%" />
        <input type="hidden" name="current_step" value="1" />
		
        <ul id="submit-info">
        <li><input type="submit" value="Continue" name="button_press_5" tabindex="1" onclick="return radio_button_checker()" title="Confirm the prospective client is an LSC-eligible immigrant and go the financial eligibility page." />
        <input type="submit" value="Not Eligible" name="button_press_2" tabindex="1" onclick="return confirm('Are you sure you want to\nreject this intake and\ndelete all intake data?');" title="Confirm the prospective client is NOT eligible and DELETE this intake record." />
        <input type="submit" value="Save" name="button_press_3" tabindex="1" title="Save this intake record." /></li>
        </ul>

    </form>

</div> <!-- /#main-content -->


<!-- scripts -->

<script type="text/javascript">
<!-- 
function radio_button_docchecker()
{
// set var radio_choiced to false
var radio_choiced = false;

// Loop from zero to the one minus the number of radio button selections
for (counterd = 0; counterd < document.ws.noncitizendoc.length; counterd++)
{
// If a radio button has been selected it will return true
// (If not it will return false)
if (document.ws.noncitizendoc[counterd].checked)
radio_choiced = true; 
}

if (!radio_choiced)
{
// If there were no selections made display an alert box 
alert("Please select a Document Type.")
return (false);
}
return (true);
}
function radio_button_checker()
{
// set var radio_choice to false
var radio_choice = false;

// Loop from zero to the one minus the number of radio button selections
for (counter = 0; counter < document.ws.noncitizentype.length; counter++)
{
// If a radio button has been selected it will return true
// (If not it will return false)
if (document.ws.noncitizentype[counter].checked)
radio_choice = true; 
}

if (!radio_choice)
{
// If there were no selections made display an alert box 
alert("Please select a Status.")
return (false);
}
return (radio_button_docchecker());
}
// -->
</script>
